<!DOCTYPE html>
<html lang="zh-hans-CN">
<head>
  <meta charset="UTF-8">
  <title>发票信息</title>
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
  <meta name="format-detection" content="telephone=no">
  <meta name="format-detection" content="email=no">
  <link rel="stylesheet" href="../css/frozen.css">
  <link rel="stylesheet" href="../css/style.css">
</head>
<body>

<section class="ui-tab invoice">
  <ul class="ui-tab-nav ui-border-b">
    <li class="current href" data-href="user_invoice.html">开发票</li>
    <li class="href" data-href="user_invoice_water.html">已开发票</li>
    <li class="href" data-href="user_invoice_matching.html">发票核销</li>
  </ul>
  <ul class="ui-tab-content">
    <!-- 开发票 -->
    <li class="current">
      <article class="rech-rec-sec">
        <ul class="ui-list ui-border-b">
          <li class="ui-border-t">
            <div class="inv-check">
              <label class="ui-checkbox">
                <input type="checkbox" checked>
              </label>
            </div>
            <div class="rec-tit">
              ￥<p>200.00</p>
            </div>
            <div class="ui-list-info">
              <h4 class="ui-nowrap">优惠20元   实际付款188元</h4>
              <p class="ui-nowrap">2016-06-14 08:12:43</p>
            </div>
          </li>
          <li class="ui-border-t">
            <div class="inv-check">
              <label class="ui-checkbox">
                <input type="checkbox">
              </label>
            </div>
            <div class="rec-tit">
              ￥<p>600.00</p>
            </div>
            <div class="ui-list-info">
              <h4 class="ui-nowrap">优惠20元   实际付款188元</h4>
              <p class="ui-nowrap">2016-06-14 08:12:43</p>
            </div>
          </li>
          <li class="ui-border-t">
            <div class="inv-check">
              <label class="ui-checkbox">
                <input type="checkbox">
              </label>
            </div>
            <div class="rec-tit">
              ￥<p>600.00</p>
            </div>
            <div class="ui-list-info">
              <h4 class="ui-nowrap">优惠20元   实际付款188元</h4>
              <p class="ui-nowrap">2016-06-14 08:12:43</p>
            </div>
          </li>
          <li class="ui-border-t">
            <div class="inv-check">
              <label class="ui-checkbox">
                <input type="checkbox">
              </label>
            </div>
            <div class="rec-tit">
              ￥<p>600.00</p>
            </div>
            <div class="ui-list-info">
              <h4 class="ui-nowrap">优惠20元   实际付款188元</h4>
              <p class="ui-nowrap">2016-06-14 08:12:43</p>
            </div>
          </li>
          <li class="ui-border-t">
            <div class="inv-check">
              <label class="ui-checkbox">
                <input type="checkbox">
              </label>
            </div>
            <div class="rec-tit">
              ￥<p>600.00</p>
            </div>
            <div class="ui-list-info">
              <h4 class="ui-nowrap">优惠20元   实际付款188元</h4>
              <p class="ui-nowrap">2016-06-14 08:12:43</p>
            </div>
          </li>
        </ul>

        <div class="float-btn">
          <div class="ui-panel ui-panel-simple ui-border-tb inv-bottom">
            <h2><span class="ui-nowrap">发票抬头:四川笑笑虎融资有限公司</span> <span class="ui-panel-title-tips" id="showcomon"><i class="ui-icon-set"></i></span></h2>
          </div>
          <div class="ui-btn-wrap">
            <button type="button" class="ui-btn-lg ui-btn-danger">确定</button>
          </div>
        </div>
      </article>
    </li>
  </ul>
</section>

<!-- 选择发票抬头 -->
<div class="comon-pop">
  <div class="comon-scroll">
    <div class="addprompt">
      <a href="javascript:" id="addremind"><i class="addblue"></i>新增发票抬头</a>
    </div>

    <ul class="ui-list ui-list-text ui-border-b">
      <li class="ui-border-t" data-id="as1">
        <div class="ui-list-info">
          <h4 class="ui-nowrap">这是标题，加ui-nowrap可以超出长度截断</h4>
        </div>
        <div class="sel-crl">
          <button class="ui-btn">删除</button>
          <button class="ui-btn modify">修改</button>
        </div>
        <div class="ui-reddot ui-reddot-static"></div>
      </li>
      <li class="ui-border-t" data-id="as2">
        <div class="ui-list-info">
          <h4 class="ui-nowrap">北京昂沁科技</h4>
        </div>
        <div class="sel-crl">
          <button class="ui-btn">删除</button>
          <button class="ui-btn modify">修改</button>
        </div>
        <div class="ui-reddot-static"></div>
      </li>
      <li class="ui-border-t" data-id="as3">
        <div class="ui-list-info">
          <h4 class="ui-nowrap">北京昂沁科技</h4>
        </div>
        <div class="sel-crl">
          <button class="ui-btn">删除</button>
          <button class="ui-btn modify">修改</button>
        </div>
        <div class="ui-reddot-static"></div>
      </li>

    </ul>
  </div>
</div>

<!-- 添加发票抬头 -->
<div class="ui-dialog log1">
  <div class="ui-dialog-cnt">
    <div class="ui-dialog-bd no-w">
      <div class="ui-form-item ui-form-item-pure ui-border ui-border-radius">
        <input type="text" placeholder="添加发票抬头">
      </div>
    </div>
    <div class="ui-dialog-ft ui-btn-group">
      <button type="button" data-role="button" class="select">关闭</button>
      <button type="button" class="select">添加</button>
    </div>
  </div>
</div>

<!-- 添加发票抬头 -->
<div class="ui-dialog log2">
  <div class="ui-dialog-cnt">
    <div class="ui-dialog-bd no-w">
      <div class="ui-form-item ui-form-item-pure ui-border ui-border-radius">
        <input type="text" placeholder="修改发票抬头" id="modiInput">
      </div>
    </div>
    <div class="ui-dialog-ft ui-btn-group">
      <button type="button" data-role="button" class="select">关闭</button>
      <button type="button" class="select" id="modi">修改</button>
    </div>
  </div>
</div>


<script src="../lib/zepto.min.js"></script>
<script src="../lib/layer.js"></script>
<script src="../js/frozen.js"></script>
<script src="../js/main.js"></script>
<script>
  (function() {

    // 修改发票抬头
    $('#showcomon').on('tap',function (e) {
      e.preventDefault();
      $('.comon-pop').show();
    });

    // 弹出添加框
    $("#addremind").tap(function(){
      var dia=$(".log1").dialog("show");
      dia.on("dialog:action",function(e){
        console.log(e.index);
        if(e.index){
          window.location.href = 'invoice_detail.html';
        }
      });
    });

    // 选择发票抬头
    $('.comon-pop li').click(function () {
      window.location.href = 'invoice_detail.html';
    });

    /* 修改记录 */
    var modi = '';
    $('.modify').on('touchend',function (e) {
      e.preventDefault();
      var dia=$(".log2").dialog("show");
      $('#modiInput').val('');
      modi = $(this).parents('li')[0];
    });
    $('#modi').on('tap',function () {
      $('.log2').removeClass('show');
      var tag = $.trim($('#modiInput').val());
      if(tag){
        $.ajax({
          url:'',
          type:'get',
          data:'',
          success:function () {
            $(modi).find('h4').html(tag);
          }
        });
      }
    });


  })();
</script>
</body>
</html>